#ifndef SEU_BITFIELD
#define SEU_BITFIELD
#include"include.h"

typedef struct
{
   unsigned int length;
   unsigned char *bitfield;
} bitfield_t;

bitfield_t *bitfieldInit(unsigned int len);

short bitfieldGet(bitfield_t *b, unsigned int i);

void bitfieldSet(bitfield_t *b, unsigned int i, short val);

int bitfieldFull(bitfield_t *b);
int bitfieldSubFull(bitfield_t *b, unsigned int len);

double bitfieldPercent(bitfield_t *b);

unsigned int bitfieldGetLen(bitfield_t *b);

void bitfieldPrint(bitfield_t *b);



#endif
